call to a member function query on null or string